<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=no"/>
	<title>Mobile Access</title>
	<style>
		*{
			margin: 0;
			padding: 0;
		}
		/* html,body{
			margin: 0;
			padding: 0;
			height: 100%;
			overflow: hidden;
		} */
		html{
			overflow-x: hidden;
			height: 100%;
			-webkit-tap-highlight-color: transparent;
		}
		.main-container{
			position: relative;
			background-image: url('./loading.jpg');
			background-repeat: no-repeat;
			background-size: cover;
			background-position: top;
			height: 100%;
		}
		.skip{
			width: 50px;
			height: 50px;
			border-radius: 50px;
			background-color: rgba(0, 0, 0, .8);
			display: flex;
			justify-content: center;
			align-items: center;
			flex-direction: column;
			color: #ffffff;
			cursor: pointer;
			position: absolute;
			top: 20px;
			right: 20px;
		}
		.skip:focus, .skip:active:focus, .skip.active:focus, .skip.focus, .skip:active.focus, .skip.active.focus {
			outline: none;
			border-color: transparent;
			box-shadow:none;
		}
		.count{
			font-size: 14px;
		}
	</style>
</head>
<body >
	<div class="main-container">
		<div class="skip">
			<div>跳过</div>
			<div class="count"></div>
		</div>
	</div>
</body>
</html>
<script lang="text/javascript">
	var skip = document.getElementsByClassName('skip')[0]
	var count = document.getElementsByClassName('count')[0]
	var t = 50
	count.innerText = t + 's'
	var timmer = setInterval('fun()', 1000)
	function fun() {
		t -- 
		count.innerText = t + 's'
		if(t <= 0) {
			clearInterval(timmer)
			localRedirect()
		}
	}
	skip.addEventListener('click', function() {
		clearInterval(timmer)
		localRedirect()
	})
	function localRedirect() {
		window.location.href = 'http://www.baidu.com'
	}
</script>
